package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by zhangjh on 2016/11/15.
 */
@Entity
@Table(name = "topic")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class Topic extends IDEntityMall {

    @Column(columnDefinition = "bigint(20) comment '平台ID'")
    private Long mallId;


    @Column(columnDefinition = "varchar(255) comment '标题'")
    private String title;


    @Column(columnDefinition = "varchar(255) comment '页面链接'")
    private String url;


    @Column(columnDefinition = "varchar(765) comment '专题图片'")
    private String pic;

    @Column(columnDefinition = "varchar(255) comment '专题描述'")
    private String description;

    @Column(columnDefinition = "varchar(255) comment '专题背景图片'")
    private String backgroundPath;


    @Column(columnDefinition = "int(20) comment '序号(排序字段)'")
    private Integer seqNo;

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getBackgroundPath() {
        return backgroundPath;
    }

    public void setBackgroundPath(String backgroundPath) {
        this.backgroundPath = backgroundPath;
    }

    public Integer getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(Integer seqNo) {
        this.seqNo = seqNo;
    }

    @Override
    public String toString() {
        return "Topic{" +
                "mallId=" + mallId +
                ", title='" + title + '\'' +
                ", url='" + url + '\'' +
                ", pic='" + pic + '\'' +
                ", description='" + description + '\'' +
                ", backgroundPath='" + backgroundPath + '\'' +
                ", seqNo=" + seqNo +
                '}';
    }
}
